<template>
  <div>
    <traffic-top />
    <Traffic-banner :banner="banner"  />
    <Traffic-content :contentList="contentList" @LicenseClick="LicenseClick" />
  </div>
</template>

<script>
import TrafficTop from "./component/TrafficTop";
import TrafficBanner from "./component/TrafficBanner";
import TrafficContent from "./component/TrafficContent";
import { bannerList } from "@/service/traffic/traffic";
import nav from "../../mixin/nav";

export default {
  mixins: [nav],
  data() {
    return {
      banner: [],
      contentList: [],
    };
  },
  async created() {
    let { data } = await bannerList();
    // console.log({ data });
    if (data.code == 200) {
      this.banner = data.rows;
    }
  },
  methods: {
    LicenseClick(val) {
      this.$router.push({ path: "/" + val });
    
    },
  },
 
  mounted() {
    this.contentList = this.$store.state.traffic.list;
    // console.log(this.contentList);
  },

  components: {
    TrafficTop,
    TrafficBanner,
    TrafficContent,
  },
};
</script>

<style>
</style>